package com.aep.provisioning.domain;

import java.math.BigDecimal;
import java.util.Date;


public class EspRateCode extends BaseEntity {
	
	private static final long serialVersionUID = 0L;

	private Long utility;
	private String rateCode;
	private Date fromDate;
	private Date thruDate;
	private String comments;
	private BigDecimal kWhRate; 
	private EspRateCodeStatus status;
	private BigDecimal monthlyRate;
	private BigDecimal kWRate;
	private BigDecimal discountAmount;
	private RateReadyPlanType plan;
	private BigDecimal summerKWhRate;
	private BigDecimal nonSummerKWhRate;

	private String utilityString;
	
	public BigDecimal getMonthlyRate() {
		return monthlyRate;
	}
	public void setMonthlyRate(BigDecimal monthlyRate) {
		this.monthlyRate = monthlyRate;
	}
	public BigDecimal getSummerKWhRate() {
		return summerKWhRate;
	}
	public void setSummerKWhRate(BigDecimal summerKWhRate) {
		this.summerKWhRate = summerKWhRate;
	}
	public BigDecimal getNonSummerKWhRate() {
		return nonSummerKWhRate;
	}
	public void setNonSummerKWhRate(BigDecimal nonSummerKWhRate) {
		this.nonSummerKWhRate = nonSummerKWhRate;
	}
	public BigDecimal getkWRate() {
		return kWRate;
	}
	public void setkWRate(BigDecimal kWRate) {
		this.kWRate = kWRate;
	}
	public BigDecimal getDiscountAmount() {
		return discountAmount;
	}
	public void setDiscountAmount(BigDecimal discountAmount) {
		this.discountAmount = discountAmount;
	}
	
	public RateReadyPlanType getPlan() {
		return plan;
	}
	public void setPlan(RateReadyPlanType plan) {
		this.plan = plan;
	}

	//	 New Fields for new product FPCT	
	private String action;
	
	public Long getUtility() {
		return utility;
	}
	public void setUtility(Long utility) {
		this.utility = utility;
	}
	public Date getFromDate() {
		return fromDate;
	}
	public void setFromDate(Date fromDate) {
		this.fromDate = fromDate;
	}
	public Date getThruDate() {
		return thruDate;
	}
	public void setThruDate(Date thruDate) {
		this.thruDate = thruDate;
	}
	public String getComments() {
		return comments;
	}
	public void setComments(String comments) {
		this.comments = comments;
	}
	public EspRateCodeStatus getStatus() {
		return status;
	}
	public void setStatus(EspRateCodeStatus status) {
		this.status = status;
	}
	public String getRateCode() {
		return rateCode;
	}
	public void setRateCode(String rateCode) {
		this.rateCode = rateCode;
	}
	public String getUtilityString() {
		return utilityString;
	}
	public void setUtilityString(String utilityString) {
		this.utilityString = utilityString;
	}
	public String getAction() {
		return action;
	}
	public void setAction(String action) {
		this.action = action;
	}
	public BigDecimal getkWhRate() {
		return kWhRate;
	}
	public BigDecimal getkWhRateFormat() {
		BigDecimal price = new BigDecimal("0.00").setScale(2);

		if(getkWhRate()!=null)
			return this.getkWhRate().setScale(2, BigDecimal.ROUND_HALF_UP);
		
		return price;
	}
	public void setkWhRate(BigDecimal price) {
		this.kWhRate = price;
	}
	
	
	@Override
	public String toString() {
		return "EspRateCode ["
				+ (utility != null ? "utility=" + utility + ", " : "")
				+ (rateCode != null ? "rateCode=" + rateCode + ", " : "")
				+ (fromDate != null ? "fromDate=" + fromDate + ", " : "")
				+ (thruDate != null ? "thruDate=" + thruDate + ", " : "")
				+ (comments != null ? "comments=" + comments + ", " : "")
				+ (kWhRate != null ? "kWhRate=" + kWhRate + ", " : "")
				+ (status != null ? "status=" + status + ", " : "")
				+ (monthlyRate != null ? "monthlyRate=" + monthlyRate + ", "
						: "")
				+ (kWRate != null ? "kWRate=" + kWRate + ", " : "")
				+ (discountAmount != null ? "discountAmount=" + discountAmount
						+ ", " : "")
				+ (plan != null ? "plan=" + plan + ", " : "")
				+ (summerKWhRate != null ? "summerKWhRate=" + summerKWhRate
						+ ", " : "")
				+ (nonSummerKWhRate != null ? "nonSummerKWhRate="
						+ nonSummerKWhRate + ", " : "")
				+ (utilityString != null ? "utilityString=" + utilityString
						+ ", " : "")
				+ (action != null ? "action=" + action : "") + "]";
	}
	
	

}
